package com.distributeredis.redis_springboot.springbootinterceptor.springbootinterceptortest.config;

import com.distributeredis.redis_springboot.springbootinterceptor.springbootinterceptortest.interceptor.InterceptorHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class WebInterceptorConfig implements WebMvcConfigurer {
    @Autowired
    private InterceptorHandler interceptorHandler;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(interceptorHandler).addPathPatterns("/dog/test","/dog/test3");
    }
}
